<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-username" data-rule="required" class="form-control" name="row[username]" type="text" value="{$row.username|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" data-rule="required" class="form-control" name="row[phone]" type="text" value="{$row.phone|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Relations')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-relation_id" data-rule="required" class="form-control selectpicker" name="row[relation_id]">
                {foreach name="relations" item="vo"}
                <option value="{$vo->id}" {in name="$vo.id" value="$row.relation_id"}selected{/in}>{$vo->name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('学员')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="checkbox">
                {foreach name="students" item="vo"}
                <label for="row[student]-{$vo->id}">
                    <input type="checkbox" id="row[student]-{$vo->id}" name="row[student][]" value="{$vo->id}" {in name="vo.id" value="$row.student_id"}checked{/in}>
                    <i style="{in name="vo.id" value="$row.student_id"}color: #ff0000;{/in}" >{$vo->username}</i>
                </label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
